package demo1;

public class Test {
  public static void main(String[] args) {
    MySingleLinkedList code = new MySingleLinkedList();
    code.addLast(1);
    code.addLast(2);

    code.addLast(6);
    code.addLast(3);
    code.addLast(4);
    code.addLast(5);
    code.addLast(6);
    //code.addLast(56);
    code.show();
    System.out.println("================");
    MySingleLinkedList.ListNode head1 = code.removeAllKey(code.head,6);
    code.show(head1);
  }
}
  /*public static void main1(String[] args) {
    MySingleLinkedList code = new MySingleLinkedList();
    code.addFirst(12);
    code.addFirst(23);
    code.addFirst(34);
    code.addFirst(23);
    code.addFirst(12);
    code.show();
    System.out.println("================");
    //找中间数
    MySingleLinkedList.ListNode slow = code.head;
    MySingleLinkedList.ListNode fast = code.head;
    while(fast.next != null){
      fast = fast.next.next;
      slow = slow.next;
    }
    //反转列表
    MySingleLinkedList.ListNode cur = code.head;
    MySingleLinkedList.ListNode curN = code.head;
    while(cur.next != null){
      cur = cur.next;
    }
    while(curN != curN.next){
      curN = curN.next;
    }
    while()
  }*/
    /*public static void main2(String[] args) {
      MySingleLinkedList code = new MySingleLinkedList();
      code.createList();
        code.show();
        System.out.println("=================");
        code.addFirst(01);
        code.show();
*/
        //code.addFirst(10);
        //code.addLast(12);
       /* code.addLast(23);
        code.addLast(34);
        code.addLast(45);*/
        //code.show();
       // System.out.println("=============");
        //code.addIndex(4,44);
       // code.show();
      //System.out.println(code.size());
      //System.out.println(code.contains(12));
      //code.remove(45);
     // code.show();
  //  }
//}
